From 3fc13274600789b22b0628cde540b11bceaa2339 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Wed, 5 Aug 2026 16:55:50 +0000 Subject: [PATCH] Add example query to LOCATIONS_UTM doc --- doc/src/tables/locations_utm.m4 | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/doc/src/tables/locations_utm.m4 b/doc/src/tables/locations_utm.m4 index 9fb4f8c..fc52146 100644 --- a/doc/src/tables/locations_utm.m4 +++ b/doc/src/tables/locations_utm.m4 @@ -30,10 +30,6 @@ LOCATIONS_UTM (spatial LOCATIONS in UTM coordinates) |LOCATIONS_UTM_summary| -.. sidebar:: - - |OBS helpful| - The system will generate a warning if the community of the follow related to the location information, or that of the |WATCHES| row that exists to support the location record, is not the comm unity @@ -41,6 +37,35 @@ associated with the location record. This means, if the LOCATIONS_UTM.\ |LOCATIONS_UTM.CommID| is not the |WATCHES|.\ |WATCHES.CommID| of the related |WATCHES| row. +The |OBS| view is useful when querying LOCATIONS_UTM. + +.. code-block:: sql + :caption: + Using OBS to provide a more complete picture of locations + tracked in UTM coordinates + + SELECT obs.wid + , obs.eid + , obs.date + , obs.animid + , obs.commid AS watchescommid + , obs.start AS time + , locations_utm.x + , locations_utm.y + , locations_utm.elevation + , locations_utm.commid AS utmcommid + , locations_utm.follownum + , locations_utm.origin + , locations_utm.entered + , obs.notes AS watch_notes + , obs.event_notes + , locations_utm.notes + FROM obs + JOIN locations_utm + ON (locations_utm.eid = obs.eid) + WHERE obs.behavior = 'sdb_utm' + ORDER BY obs.animid, obs.date, obs.start + , obs.eid; .. contents:: :depth: 2 -- 2.34.1